import QtQuick 2.5
import QtQuick.Controls 2.5
import QtQml.Models 2.1

Component {
    Rectangle {
        id: out_rect

        ObjectModel {
            id: view_model

            Loader {
                width: view.width
                height: view.height
                source: "canvas/CanvasRectangle.qml"
                onLoaded: {
                    console.log(height)
                }
            }

        }

//            Rectangle { height: 30; width: 80; color: "green" }
//            Rectangle { height: 30; width: 80; color: "blue" }
//            Rectangle {
//                id: canvas_outRect
//                height: 300
//                color: "red"


//            }   // canvas_outRect
//        }   // end ObjectModel

                // Canvas 画布

//            }

//            Rectangle {
//                id: connect_rect
//                height: 600
//                color: "gray"
//            }

        ListView {
            id: view
            anchors.fill: parent
            boundsBehavior: Flickable.StopAtBounds

            model: view_model
            Component.onCompleted: {
                console.log("view " + view.height)
            }
        }
    }
}
